<?php
/**
 * 文章编辑模板
 * User: crstu
 * Date: 2016/5/27
 * Time: 14:16
 */

use  common\widgets\ActiveForm;
use common\widgets\FormTable;

$form = ActiveForm::begin();

echo FormTable::widget([
    'model' => $model,
    'form' => $form,
    'rows' => [
        'title' => ['type' => FormTable::INPUT_TEXT,
            'options' => [
                'value' => \common\models\DAO\Product::findOne(Yii::$app->request->get()['id'])->title,
                'readonly' => true,
            ],
        ],
        'productID' => [
            'type' => FormTable::INPUT_HIDDEN,
            'options' => [
                'value' => Yii::$app->request->get()['id'],
                'readonly' => true,
            ],
        ],
        'thumb' => [
            'type' => FormTable::INPUT_WIDGET,
            'widgetClass' => 'common\widgets\UploadImage',
        ],
    ],
]);
ActiveForm::end();
